package Threads;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class ThreadMain
{

    public static void main(String[] args) {

        List<Integer> valueList = new ArrayList<Integer>();

        int status = 1000;
        ThreadRunnable tr = new ThreadRunnable(status, valueList);
        tr.start();
        ThreadPrint tp = new ThreadPrint(status, valueList);
        tp.start();
        Scanner sc = new Scanner(System.in);
        String userOut = " ";
        do {
            System.out.println("Enter stop: ");
            userOut = sc.nextLine();
        }
        while (!userOut.equalsIgnoreCase(userOut));
        tr.proces = false;
        tp.proces = false;
    }

}
